package cn.soulic.tools.redis.migration.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * Redis迁移配置属性
 *
 * @author Soulic Yang
 * @since 1.0.0
 */
@ConfigurationProperties(prefix = "redis.migration")
public class RedisMigrationProperties {
    private RedisServer source = new RedisServer();
    private RedisServer target = new RedisServer();
    private int maxCount = 100;

    public RedisServer getSource() {
        return source;
    }

    public void setSource(RedisServer source) {
        this.source = source;
    }

    public RedisServer getTarget() {
        return target;
    }

    public void setTarget(RedisServer target) {
        this.target = target;
    }

    public int getMaxCount() {
        return maxCount;
    }

    public void setMaxCount(int maxCount) {
        this.maxCount = maxCount;
    }

    public static class RedisServer {
        private String host = "localhost";
        private int port = 6379;
        private String password;
        private int database = 0;

        public String getHost() {
            return host;
        }

        public void setHost(String host) {
            this.host = host;
        }

        public int getPort() {
            return port;
        }

        public void setPort(int port) {
            this.port = port;
        }

        public String getPassword() {
            return password;
        }

        public void setPassword(String password) {
            this.password = password;
        }

        public int getDatabase() {
            return database;
        }

        public void setDatabase(int database) {
            this.database = database;
        }
    }
}
